package com.ticket.sass.provider.dto.input.resource;

import com.ticket.sass.provider.validator.InEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * @author ywb
 * @date 2022-01-07 15:48
 */
@Data
@ApiModel(value = "菜单新增输入DTO", description = "按照要求填写")
public class ResourceAddInput {
    @ApiModelProperty("菜单名")
    private String name;

    @ApiModelProperty("级别")
    @InEnum(intValues = {1, 2, 3}, message = "请选择正确的等级")
    private Integer level;

    @NotNull(message = "请选择父类")
    @ApiModelProperty("父类id【当类型为目录时强制父类为0，类型为菜单时强制父类为目录，以此类推】")
    private Integer parentId;
    
    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty("备注")
    private String remark;
    
    @ApiModelProperty("前端自定义数据 根据等级自定义变换")
    private Map<String, Object> data;
    
    @ApiModelProperty(value = "权限标识符")
    private String perms;
}
